<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>加减法口算练习系统-v0.5</title>
    <style>
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body { font-family: 'Segoe UI', Arial, sans-serif; max-width: 1400px; margin: 0 auto; padding: 20px; background-color: #f5f7fa; }
        .container { background-color: white; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); padding: 30px; }
        h1 { color: #2c3e50; text-align: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #3498db; }
        .stats { text-align: center; color: #666; margin: 10px 0 25px; font-size: 1.1em; }
        .exercise-container { margin: 20px auto; display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px; }
        .exercise { font-size: 18px; padding: 20px; border: 1px solid #e1e5e8;
            border-radius: 8px; background-color: white; transition: transform 0.2s, box-shadow 0.2s; }
        .exercise:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
        .addition { border-left: 4px solid #2ecc71; }
        .subtraction { border-left: 4px solid #3498db; }
        .number { font-weight: bold; color: #2c3e50; margin-right: 8px; }
        .expression { color: #34495e; }
        .input-group { margin: 15px 0; display: flex; align-items: center; gap: 10px; }
        input { width: 70px; padding: 10px; font-size: 16px; text-align: center;
            border: 1px solid #bdc3c7; border-radius: 4px; transition: border 0.3s; }
        input:focus { border-color: #3498db; outline: none; box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2); }
        .btn { padding: 8px 16px; font-size: 14px; border: none; border-radius: 4px; cursor: pointer; transition: background-color 0.3s; }
        .check-btn { background-color: #95a5a6; color: white; }
        .check-btn:hover { background-color: #7f8c8d; }
        .reset-btn { background-color: #f39c12; color: white; }
        .reset-btn:hover { background-color: #e67e22; }
        .feedback { margin-top: 12px; padding: 10px; border-radius: 4px; font-size: 14px; display: none; }
        .correct { background-color: #eafaf1; color: #27ae60; border: 1px solid #c8e6c9; display: block; }
        .incorrect { background-color: #fdedeb; color: #e74c3c; border: 1px solid #f8d7da; display: block; }
        .empty { background-color: #fef9e7; color: #f39c12; border: 1px solid #f5e79e; display: block; }
        .controls { text-align: center; margin: 30px 0; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
        .main-btn { padding: 12px 24px; font-size: 16px; }
        #submitAllBtn { background-color: #3498db; color: white; }
        #submitAllBtn:hover { background-color: #2980b9; }
        #resetAllBtn { background-color: #e74c3c; color: white; }
        #resetAllBtn:hover { background-color: #c0392b; }
        #regenerateBtn { background-color: #2ecc71; color: white; }
        #regenerateBtn:hover { background-color: #27ae60; }
        .footer { text-align: center; margin-top: 30px; color: #7f8c8d; font-size: 0.9em; }
        @media (max-width: 1200px) {
            .exercise-container { grid-template-columns: repeat(3, 1fr); }
        }
        @media (max-width: 900px) {
            .exercise-container { grid-template-columns: repeat(2, 1fr); }
        }
        @media (max-width: 600px) {
            .exercise-container { grid-template-columns: 1fr; }
            .controls { flex-direction: column; align-items: center; }
            .main-btn { width: 80%; }
        }
    </style>
    <script>
        function checkAnswer(index, correctAnswer) {
            const input = document.getElementById('answer_' + index);
            const feedback = document.getElementById('feedback_' + index);
            const userAnswer = input.value.trim();

            // 禁用输入框防止再次修改
            input.disabled = true;

            feedback.classList.remove('correct', 'incorrect', 'empty');

            if (userAnswer === '') {
                feedback.textContent = '未填写答案，正确答案是: ' + correctAnswer;
                feedback.classList.add('empty');
            } else if (parseInt(userAnswer) === correctAnswer) {
                feedback.textContent = '答对了，真棒！';
                feedback.classList.add('correct');
            } else {
                feedback.textContent = '答错了，正确答案是: ' + correctAnswer;
                feedback.classList.add('incorrect');
            }
        }

        function resetAnswer(index) {
            const input = document.getElementById('answer_' + index);
            const feedback = document.getElementById('feedback_' + index);

            // 清空输入和反馈
            input.value = '';
            input.disabled = false;
            feedback.textContent = '';
            feedback.classList.remove('correct', 'incorrect', 'empty');
        }

        function submitAllAnswers() {
            const total = 50;
            let correctCount = 0;
            for (let i = 0; i < total; i++) {
                const input = document.getElementById('answer_' + i);
                const correctAnswer = parseInt(document.getElementById('correct_' + i).value);
                const userAnswer = input.value.trim();

                if (userAnswer !== '' && parseInt(userAnswer) === correctAnswer) {
                    correctCount++;
                }
                checkAnswer(i, correctAnswer);
            }
            alert('提交完成！共' + total + '题，答对' + correctCount + '题，正确率：' + Math.round((correctCount/total)*100) + '%');
        }

        function resetAllAnswers() {
            if (confirm('确定要重置所有答案吗？当前输入将被清空')) {
                const total = 50;
                for (let i = 0; i < total; i++) {
                    resetAnswer(i);
                }
            }
        }

        function regenerateExercises() {
            if (confirm('确定要生成新的50道题目吗？当前进度将丢失')) {
                window.location.href = 'math_exercises_v0.5.html';
            }
        }
    </script>
</head>
<body>
    <div class="container">
        <h1>加减法口算练习系统-v0.5</h1>
        <div class="stats">
            共50题（加法：30题，减法：20题）
        </div>
        <div class="exercise-container">
            <div class="exercise subtraction">
                <span class="number">1. </span>
                <span class="expression">83 - 4 = </span>
                <div class="input-group">
                    <input type="number" id="answer_0" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(0, 79)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(0)">重置</button>
                </div>
                <div id="feedback_0" class="feedback"></div>
                <input type="hidden" id="correct_0" value="79">
            </div>
            <div class="exercise addition">
                <span class="number">2. </span>
                <span class="expression">2 + 26 = </span>
                <div class="input-group">
                    <input type="number" id="answer_1" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(1, 28)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(1)">重置</button>
                </div>
                <div id="feedback_1" class="feedback"></div>
                <input type="hidden" id="correct_1" value="28">
            </div>
            <div class="exercise subtraction">
                <span class="number">3. </span>
                <span class="expression">69 - 25 = </span>
                <div class="input-group">
                    <input type="number" id="answer_2" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(2, 44)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(2)">重置</button>
                </div>
                <div id="feedback_2" class="feedback"></div>
                <input type="hidden" id="correct_2" value="44">
            </div>
            <div class="exercise subtraction">
                <span class="number">4. </span>
                <span class="expression">56 - 3 = </span>
                <div class="input-group">
                    <input type="number" id="answer_3" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(3, 53)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(3)">重置</button>
                </div>
                <div id="feedback_3" class="feedback"></div>
                <input type="hidden" id="correct_3" value="53">
            </div>
            <div class="exercise addition">
                <span class="number">5. </span>
                <span class="expression">36 + 64 = </span>
                <div class="input-group">
                    <input type="number" id="answer_4" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(4, 100)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(4)">重置</button>
                </div>
                <div id="feedback_4" class="feedback"></div>
                <input type="hidden" id="correct_4" value="100">
            </div>
            <div class="exercise subtraction">
                <span class="number">6. </span>
                <span class="expression">99 - 2 = </span>
                <div class="input-group">
                    <input type="number" id="answer_5" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(5, 97)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(5)">重置</button>
                </div>
                <div id="feedback_5" class="feedback"></div>
                <input type="hidden" id="correct_5" value="97">
            </div>
            <div class="exercise addition">
                <span class="number">7. </span>
                <span class="expression">5 + 49 = </span>
                <div class="input-group">
                    <input type="number" id="answer_6" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(6, 54)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(6)">重置</button>
                </div>
                <div id="feedback_6" class="feedback"></div>
                <input type="hidden" id="correct_6" value="54">
            </div>
            <div class="exercise addition">
                <span class="number">8. </span>
                <span class="expression">1 + 67 = </span>
                <div class="input-group">
                    <input type="number" id="answer_7" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(7, 68)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(7)">重置</button>
                </div>
                <div id="feedback_7" class="feedback"></div>
                <input type="hidden" id="correct_7" value="68">
            </div>
            <div class="exercise addition">
                <span class="number">9. </span>
                <span class="expression">0 + 14 = </span>
                <div class="input-group">
                    <input type="number" id="answer_8" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(8, 14)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(8)">重置</button>
                </div>
                <div id="feedback_8" class="feedback"></div>
                <input type="hidden" id="correct_8" value="14">
            </div>
            <div class="exercise addition">
                <span class="number">10. </span>
                <span class="expression">14 + 16 = </span>
                <div class="input-group">
                    <input type="number" id="answer_9" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(9, 30)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(9)">重置</button>
                </div>
                <div id="feedback_9" class="feedback"></div>
                <input type="hidden" id="correct_9" value="30">
            </div>
            <div class="exercise subtraction">
                <span class="number">11. </span>
                <span class="expression">100 - 20 = </span>
                <div class="input-group">
                    <input type="number" id="answer_10" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(10, 80)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(10)">重置</button>
                </div>
                <div id="feedback_10" class="feedback"></div>
                <input type="hidden" id="correct_10" value="80">
            </div>
            <div class="exercise subtraction">
                <span class="number">12. </span>
                <span class="expression">55 - 35 = </span>
                <div class="input-group">
                    <input type="number" id="answer_11" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(11, 20)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(11)">重置</button>
                </div>
                <div id="feedback_11" class="feedback"></div>
                <input type="hidden" id="correct_11" value="20">
            </div>
            <div class="exercise addition">
                <span class="number">13. </span>
                <span class="expression">15 + 26 = </span>
                <div class="input-group">
                    <input type="number" id="answer_12" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(12, 41)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(12)">重置</button>
                </div>
                <div id="feedback_12" class="feedback"></div>
                <input type="hidden" id="correct_12" value="41">
            </div>
            <div class="exercise addition">
                <span class="number">14. </span>
                <span class="expression">32 + 52 = </span>
                <div class="input-group">
                    <input type="number" id="answer_13" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(13, 84)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(13)">重置</button>
                </div>
                <div id="feedback_13" class="feedback"></div>
                <input type="hidden" id="correct_13" value="84">
            </div>
            <div class="exercise addition">
                <span class="number">15. </span>
                <span class="expression">19 + 78 = </span>
                <div class="input-group">
                    <input type="number" id="answer_14" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(14, 97)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(14)">重置</button>
                </div>
                <div id="feedback_14" class="feedback"></div>
                <input type="hidden" id="correct_14" value="97">
            </div>
            <div class="exercise subtraction">
                <span class="number">16. </span>
                <span class="expression">78 - 54 = </span>
                <div class="input-group">
                    <input type="number" id="answer_15" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(15, 24)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(15)">重置</button>
                </div>
                <div id="feedback_15" class="feedback"></div>
                <input type="hidden" id="correct_15" value="24">
            </div>
            <div class="exercise addition">
                <span class="number">17. </span>
                <span class="expression">8 + 89 = </span>
                <div class="input-group">
                    <input type="number" id="answer_16" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(16, 97)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(16)">重置</button>
                </div>
                <div id="feedback_16" class="feedback"></div>
                <input type="hidden" id="correct_16" value="97">
            </div>
            <div class="exercise addition">
                <span class="number">18. </span>
                <span class="expression">20 + 47 = </span>
                <div class="input-group">
                    <input type="number" id="answer_17" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(17, 67)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(17)">重置</button>
                </div>
                <div id="feedback_17" class="feedback"></div>
                <input type="hidden" id="correct_17" value="67">
            </div>
            <div class="exercise subtraction">
                <span class="number">19. </span>
                <span class="expression">86 - 15 = </span>
                <div class="input-group">
                    <input type="number" id="answer_18" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(18, 71)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(18)">重置</button>
                </div>
                <div id="feedback_18" class="feedback"></div>
                <input type="hidden" id="correct_18" value="71">
            </div>
            <div class="exercise addition">
                <span class="number">20. </span>
                <span class="expression">0 + 54 = </span>
                <div class="input-group">
                    <input type="number" id="answer_19" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(19, 54)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(19)">重置</button>
                </div>
                <div id="feedback_19" class="feedback"></div>
                <input type="hidden" id="correct_19" value="54">
            </div>
            <div class="exercise addition">
                <span class="number">21. </span>
                <span class="expression">45 + 54 = </span>
                <div class="input-group">
                    <input type="number" id="answer_20" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(20, 99)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(20)">重置</button>
                </div>
                <div id="feedback_20" class="feedback"></div>
                <input type="hidden" id="correct_20" value="99">
            </div>
            <div class="exercise subtraction">
                <span class="number">22. </span>
                <span class="expression">78 - 38 = </span>
                <div class="input-group">
                    <input type="number" id="answer_21" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(21, 40)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(21)">重置</button>
                </div>
                <div id="feedback_21" class="feedback"></div>
                <input type="hidden" id="correct_21" value="40">
            </div>
            <div class="exercise subtraction">
                <span class="number">23. </span>
                <span class="expression">32 - 32 = </span>
                <div class="input-group">
                    <input type="number" id="answer_22" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(22, 0)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(22)">重置</button>
                </div>
                <div id="feedback_22" class="feedback"></div>
                <input type="hidden" id="correct_22" value="0">
            </div>
            <div class="exercise subtraction">
                <span class="number">24. </span>
                <span class="expression">66 - 52 = </span>
                <div class="input-group">
                    <input type="number" id="answer_23" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(23, 14)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(23)">重置</button>
                </div>
                <div id="feedback_23" class="feedback"></div>
                <input type="hidden" id="correct_23" value="14">
            </div>
            <div class="exercise addition">
                <span class="number">25. </span>
                <span class="expression">34 + 38 = </span>
                <div class="input-group">
                    <input type="number" id="answer_24" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(24, 72)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(24)">重置</button>
                </div>
                <div id="feedback_24" class="feedback"></div>
                <input type="hidden" id="correct_24" value="72">
            </div>
            <div class="exercise subtraction">
                <span class="number">26. </span>
                <span class="expression">100 - 22 = </span>
                <div class="input-group">
                    <input type="number" id="answer_25" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(25, 78)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(25)">重置</button>
                </div>
                <div id="feedback_25" class="feedback"></div>
                <input type="hidden" id="correct_25" value="78">
            </div>
            <div class="exercise addition">
                <span class="number">27. </span>
                <span class="expression">10 + 61 = </span>
                <div class="input-group">
                    <input type="number" id="answer_26" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(26, 71)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(26)">重置</button>
                </div>
                <div id="feedback_26" class="feedback"></div>
                <input type="hidden" id="correct_26" value="71">
            </div>
            <div class="exercise addition">
                <span class="number">28. </span>
                <span class="expression">35 + 43 = </span>
                <div class="input-group">
                    <input type="number" id="answer_27" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(27, 78)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(27)">重置</button>
                </div>
                <div id="feedback_27" class="feedback"></div>
                <input type="hidden" id="correct_27" value="78">
            </div>
            <div class="exercise addition">
                <span class="number">29. </span>
                <span class="expression">0 + 30 = </span>
                <div class="input-group">
                    <input type="number" id="answer_28" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(28, 30)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(28)">重置</button>
                </div>
                <div id="feedback_28" class="feedback"></div>
                <input type="hidden" id="correct_28" value="30">
            </div>
            <div class="exercise addition">
                <span class="number">30. </span>
                <span class="expression">0 + 83 = </span>
                <div class="input-group">
                    <input type="number" id="answer_29" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(29, 83)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(29)">重置</button>
                </div>
                <div id="feedback_29" class="feedback"></div>
                <input type="hidden" id="correct_29" value="83">
            </div>
            <div class="exercise addition">
                <span class="number">31. </span>
                <span class="expression">3 + 86 = </span>
                <div class="input-group">
                    <input type="number" id="answer_30" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(30, 89)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(30)">重置</button>
                </div>
                <div id="feedback_30" class="feedback"></div>
                <input type="hidden" id="correct_30" value="89">
            </div>
            <div class="exercise addition">
                <span class="number">32. </span>
                <span class="expression">31 + 57 = </span>
                <div class="input-group">
                    <input type="number" id="answer_31" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(31, 88)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(31)">重置</button>
                </div>
                <div id="feedback_31" class="feedback"></div>
                <input type="hidden" id="correct_31" value="88">
            </div>
            <div class="exercise subtraction">
                <span class="number">33. </span>
                <span class="expression">94 - 80 = </span>
                <div class="input-group">
                    <input type="number" id="answer_32" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(32, 14)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(32)">重置</button>
                </div>
                <div id="feedback_32" class="feedback"></div>
                <input type="hidden" id="correct_32" value="14">
            </div>
            <div class="exercise addition">
                <span class="number">34. </span>
                <span class="expression">30 + 35 = </span>
                <div class="input-group">
                    <input type="number" id="answer_33" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(33, 65)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(33)">重置</button>
                </div>
                <div id="feedback_33" class="feedback"></div>
                <input type="hidden" id="correct_33" value="65">
            </div>
            <div class="exercise subtraction">
                <span class="number">35. </span>
                <span class="expression">93 - 7 = </span>
                <div class="input-group">
                    <input type="number" id="answer_34" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(34, 86)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(34)">重置</button>
                </div>
                <div id="feedback_34" class="feedback"></div>
                <input type="hidden" id="correct_34" value="86">
            </div>
            <div class="exercise addition">
                <span class="number">36. </span>
                <span class="expression">1 + 82 = </span>
                <div class="input-group">
                    <input type="number" id="answer_35" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(35, 83)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(35)">重置</button>
                </div>
                <div id="feedback_35" class="feedback"></div>
                <input type="hidden" id="correct_35" value="83">
            </div>
            <div class="exercise addition">
                <span class="number">37. </span>
                <span class="expression">17 + 64 = </span>
                <div class="input-group">
                    <input type="number" id="answer_36" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(36, 81)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(36)">重置</button>
                </div>
                <div id="feedback_36" class="feedback"></div>
                <input type="hidden" id="correct_36" value="81">
            </div>
            <div class="exercise addition">
                <span class="number">38. </span>
                <span class="expression">5 + 9 = </span>
                <div class="input-group">
                    <input type="number" id="answer_37" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(37, 14)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(37)">重置</button>
                </div>
                <div id="feedback_37" class="feedback"></div>
                <input type="hidden" id="correct_37" value="14">
            </div>
            <div class="exercise addition">
                <span class="number">39. </span>
                <span class="expression">6 + 65 = </span>
                <div class="input-group">
                    <input type="number" id="answer_38" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(38, 71)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(38)">重置</button>
                </div>
                <div id="feedback_38" class="feedback"></div>
                <input type="hidden" id="correct_38" value="71">
            </div>
            <div class="exercise subtraction">
                <span class="number">40. </span>
                <span class="expression">33 - 6 = </span>
                <div class="input-group">
                    <input type="number" id="answer_39" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(39, 27)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(39)">重置</button>
                </div>
                <div id="feedback_39" class="feedback"></div>
                <input type="hidden" id="correct_39" value="27">
            </div>
            <div class="exercise addition">
                <span class="number">41. </span>
                <span class="expression">35 + 58 = </span>
                <div class="input-group">
                    <input type="number" id="answer_40" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(40, 93)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(40)">重置</button>
                </div>
                <div id="feedback_40" class="feedback"></div>
                <input type="hidden" id="correct_40" value="93">
            </div>
            <div class="exercise addition">
                <span class="number">42. </span>
                <span class="expression">20 + 56 = </span>
                <div class="input-group">
                    <input type="number" id="answer_41" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(41, 76)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(41)">重置</button>
                </div>
                <div id="feedback_41" class="feedback"></div>
                <input type="hidden" id="correct_41" value="76">
            </div>
            <div class="exercise addition">
                <span class="number">43. </span>
                <span class="expression">15 + 65 = </span>
                <div class="input-group">
                    <input type="number" id="answer_42" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(42, 80)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(42)">重置</button>
                </div>
                <div id="feedback_42" class="feedback"></div>
                <input type="hidden" id="correct_42" value="80">
            </div>
            <div class="exercise subtraction">
                <span class="number">44. </span>
                <span class="expression">93 - 80 = </span>
                <div class="input-group">
                    <input type="number" id="answer_43" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(43, 13)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(43)">重置</button>
                </div>
                <div id="feedback_43" class="feedback"></div>
                <input type="hidden" id="correct_43" value="13">
            </div>
            <div class="exercise subtraction">
                <span class="number">45. </span>
                <span class="expression">53 - 19 = </span>
                <div class="input-group">
                    <input type="number" id="answer_44" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(44, 34)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(44)">重置</button>
                </div>
                <div id="feedback_44" class="feedback"></div>
                <input type="hidden" id="correct_44" value="34">
            </div>
            <div class="exercise subtraction">
                <span class="number">46. </span>
                <span class="expression">85 - 1 = </span>
                <div class="input-group">
                    <input type="number" id="answer_45" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(45, 84)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(45)">重置</button>
                </div>
                <div id="feedback_45" class="feedback"></div>
                <input type="hidden" id="correct_45" value="84">
            </div>
            <div class="exercise addition">
                <span class="number">47. </span>
                <span class="expression">5 + 35 = </span>
                <div class="input-group">
                    <input type="number" id="answer_46" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(46, 40)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(46)">重置</button>
                </div>
                <div id="feedback_46" class="feedback"></div>
                <input type="hidden" id="correct_46" value="40">
            </div>
            <div class="exercise subtraction">
                <span class="number">48. </span>
                <span class="expression">71 - 1 = </span>
                <div class="input-group">
                    <input type="number" id="answer_47" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(47, 70)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(47)">重置</button>
                </div>
                <div id="feedback_47" class="feedback"></div>
                <input type="hidden" id="correct_47" value="70">
            </div>
            <div class="exercise addition">
                <span class="number">49. </span>
                <span class="expression">9 + 83 = </span>
                <div class="input-group">
                    <input type="number" id="answer_48" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(48, 92)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(48)">重置</button>
                </div>
                <div id="feedback_48" class="feedback"></div>
                <input type="hidden" id="correct_48" value="92">
            </div>
            <div class="exercise subtraction">
                <span class="number">50. </span>
                <span class="expression">72 - 15 = </span>
                <div class="input-group">
                    <input type="number" id="answer_49" placeholder="?">
                    <button class="btn check-btn" onclick="checkAnswer(49, 57)">检查</button>
                    <button class="btn reset-btn" onclick="resetAnswer(49)">重置</button>
                </div>
                <div id="feedback_49" class="feedback"></div>
                <input type="hidden" id="correct_49" value="57">
            </div>
        </div>
        <div class="controls">
            <button id="submitAllBtn" class="btn main-btn" onclick="submitAllAnswers()">提交所有答案</button>
            <button id="resetAllBtn" class="btn main-btn" onclick="resetAllAnswers()">重置所有题目</button>
            <button id="regenerateBtn" class="btn main-btn" onclick="regenerateExercises()">生成新题目</button>
        </div>
        <div class="footer">
            加减法口算练习系统 &copy; 2025
        </div>
    </div>
</body>
</html>
